package work

type BaseField struct {
	RequirementContent   string  `json:"requirement_content,omitempty" binding:"required"`           // 需求内容
	ContactPersonId      int    `json:"contact_person_id,omitempty" binding:"required"`             // 对接人
	Price                string `json:"price,omitempty" binding:"required"`                          // 价格
	SettlementStatus     int    `json:"settlement_status,omitempty" binding:"required"`              // 结算情况 (1:已结算, 2:未结算)
	SettlementMethod     int    `json:"settlement_method,omitempty" binding:"required"`              // 结算方式 (1:一次性付清, 2:分期结算, 3:里程碑付款, 4:工时结算)
	PaymentMethod        int    `json:"payment_method,omitempty" binding:"required"`                 // 付款方式 (1:银行卡, 2:支付宝, 3:微信, 4:现金)
	InvoiceStatus        int    `json:"invoice_status,omitempty" binding:"required"`                 // 发票状态 (1:待开票, 2:已申请, 3:已开具, 4:已寄出, 5:已拒收)
	SettlementDate       string `json:"settlement_date,omitempty" binding:"required"`                // 结算日期
	InvoiceDate          string `json:"invoice_date,omitempty"`                   // 开票日期
	PaymentDate          string `json:"payment_date,omitempty"`                   // 付款日期
	Type               int    `gorm:"column:type" json:"type" binding:"min=0" default:"0"`
	ProjectId          int    `gorm:"column:project_id" json:"project_id" binding:"min=0" default:"0"`
	DetailImg          string `gorm:"column:detail_img" json:"detail_img"` //详情图片
}

type Id struct {
	Id int `form:"id" json:"id" binding:"required,min=1"` // 注意：gin框架数字的存储形式都是 int
}

type RequirementContent struct {
	RequirementContent string `form:"requirement_content" json:"requirement_content"`
}

// 结算情况
type SettlementStatus struct {
	SettlementStatus int `form:"settlement_status" json:"settlement_status"`
}

// 结算方式
type SettlementMethod struct {
	SettlementMethod int `form:"settlement_method" json:"settlement_method"`
}

// 付款方式
type PaymentMethod struct {
	PaymentMethod int `form:"payment_method" json:"payment_method"`
}

// 发票状态
type InvoiceStatus struct {
	InvoiceStatus int `form:"invoice_status" json:"invoice_status"`
}

type SettlementDate struct {
	SettlementDateStart string `form:"settlement_date_start" json:"settlement_date_start"`
	SettlementDateEnd string `form:"settlement_date_end" json:"settlement_date_end"`
}

type InvoiceDate struct {
	InvoiceDateStart string `form:"invoice_date_start" json:"invoice_date_start"`
	InvoiceDateEnd string `form:"invoice_date_end" json:"invoice_date_end"`
}

type PaymentDate struct {
	PaymentDateStart string `form:"payment_date_start" json:"payment_date_start"`
	PaymentDateEnd string `form:"payment_date_end" json:"payment_date_end"`
}


